﻿package mortal.game.view.friend
{
    import flash.events.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class FriendRecommendIcon extends HintBaseIcon
    {
        private static var _instance:FriendRecommendIcon;

        public function FriendRecommendIcon(param1:String)
        {
            super(param1);
            if (_instance != null)
            {
                throw new Error("FriendRecommendIcon singleton!");
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.configEventListener(MouseEvent.CLICK, this.onClickHandler);
            return;
        }// end function

        private function onClickHandler(event:MouseEvent) : void
        {
            FriendRecommendWin.instance.show();
            this.hide();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            return;
        }// end function

        public static function get instance() : FriendRecommendIcon
        {
            if (!_instance)
            {
                _instance = new FriendRecommendIcon(ImagesConst.FriendRecommendIcon);
            }
            return _instance;
        }// end function

    }
}
